import {defHttp} from "/@/utils/http/axios";
import { useMessage } from "/@/hooks/web/useMessage";

const { createConfirm } = useMessage();

enum Api {
  listAll = '/sys/sysDepart/listAll',
  seatGroup = '/monitor/seatGroup/list',//席位分组列表
  seatGroupSave = '/monitor/seatGroup/save',//席位分组保存
  deleteGroup = '/monitor/seatGroup/deleteGroup',//解散分组
  delete = '/monitor/seatGroup/delete',//删除
  forceCheckOut = '/monitor/seatUser/forceCheckOut',//席位当前用户-强制离线席位

  forceCheckOutAll = '/monitor/seatUser/forceCheckOutAll',//席位当前用户-强制离线所有席位

  violationList = '/monitor/violation/list',//违规记录

  enableSeat = "/monitor/seat/enableSeat",//启用席位
  
  enableSeatAll = "/monitor/seat/enableSeatAll",//启用所有席位

  ruleList = "/monitor/rule/list",//规则

}
 
export const listAll = () => defHttp.get({url: Api.listAll});

 
export const seatGroup = (params:any) => defHttp.get({url: Api.seatGroup,params});

export const seatGroupSave = (params:any) => defHttp.post({url: Api.seatGroupSave,params});

export const deleteGroup = (params:any) => defHttp.delete({url: Api.deleteGroup,params}, {joinParamsToUrl: true});

export const deleteGroupItem = (params:any) => defHttp.delete({url: Api.delete, params}, {joinParamsToUrl: true});

export const forceCheckOut = (params:any) => defHttp.post({url: Api.forceCheckOut,params});

export const forceCheckOutAll = (params:any) => defHttp.post({url: Api.forceCheckOutAll,params});

export const enableSeat = (params:any) => defHttp.post({url: Api.enableSeat,params});

export const enableSeatAll = (params:any) => defHttp.post({url: Api.enableSeatAll,params});

export const ruleList = (params:any) => defHttp.get({url: Api.ruleList,params});

export const violationList =  (params:any) => defHttp.get({url: Api.violationList,params});

 
